<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<head>
<%@ include file="/common/extjs.jsp"%>
<meta name="nav" content="2" />
<meta name="acc" content="2-1" />
<title>加班记录</title>
<script type="text/javascript">
$(document).ready(function(){
	$("#startdate").addClass("Wate").bind("click", function(){
		 WdatePicker({skin:'whyGreen',minDate:'1900-10-01', dateFmt:'yyyy-MM-dd '});});
		$("#enddate").addClass("Wate").bind("click", function(){
			 WdatePicker({skin:'whyGreen',minDate:'#F{$dp.$D(\'startdate\')}',dateFmt:'yyyy-MM-dd '});
		     });
		$("#usern").click(function() {
			UserNameSelector.getView(function(a, c) {
				$("#usern").val(c);
				$("#userid").val(a);
			}, true).show();
		});
})
</script>
</head>
<body>
<div id="heading" class="overtime">加班记录</div>
<form action="${ctx }/human/overtime.action" method="get"
		class="yform" id="mainForm">
<div id="filter">
<ul>
	<li>申请部门:<pt:labels type="insideOrgDept" prompt="全部" name="filter_LIKES_deptid" default="${param['filter_LIKES_deptid'] }"></pt:labels></li>
	<li>加班时间:<input id="startdate" type="text" name="filter_GED_startdate" value="${param['filter_GED_startdate'] }"></li>
	<li>加班类型:<pt:code prompt="全部" category="2031" name="filter_LIKES_type" default="${param['filter_LIKES_type'] }"></pt:code></li>
	<li>加班人<input type="text" name="usern" id="usern" value='<pt:labels type="user" argument1="${param['filter_EQS_userid'] }" single="true"></pt:labels>'
						class="choose" readonly="readonly"> <input id="userid"
						name="filter_EQS_userid" type="hidden" value="${userid}" /></li>
</ul>
<div class="type-button"><input type="button" value="查询" class="search" onclick="search();"></div>
</div>
<div id="content">
<table class="contentTable">
<tr>
	<th><a id="createDate" href="javascript:sort('createDate','asc')">序号</a></th>
	<th><a id="deptid" href="javascript:sort('deptid','asc')">申请部门</a></th>
	<th><a id="userid" href="javascript:sort('userid','asc')">加班人</a></th>
	<th><a id="startdate" href="javascript:sort('starthate','asc')">开始时间</a></th>
	<th><a href="javascript:sort('enddate','asc')">结束时间</a></th>
	<th><a id="type" href="javascript:sort('type','asc')">加班类型</a></th>
	<th>操作</th>
</tr>
<c:forEach items="${page.result}" var="overtime" varStatus="status">
<tr>
	<td>${page.first+status.index }</td>
	<td><pt:labels type="dept" single="true" argument1="${overtime.deptid}"></pt:labels></td>
						<td><pt:labels type="user" argument1="${overtime.userid }"
								single="true"></pt:labels></td>
	<td>${overtime.startdate }</td>
	<td>${overtime.enddate }</td>
	<td><pt:code category="2031" code="${overtime.type}"></pt:code></td>
	<td><a href="${ctx }/human/overtime!input.action?id=${overtime.id}">编辑</a>
		<a href="${ctx }/human/overtime!delete.action?id=${overtime.id}" onclick="return confirmDelete();">删除</a>
	</td>
</tr>
</c:forEach>
</table>
</div>
<jsp:include page="/common/page.jsp" flush="true"/>
<div class="type-button"><input type="button" onclick="location.href='${ctx}/human/overtime!input.action'" class="add" value="新增"></div>
</form>
</body>
